<template>
    <div class="xheader" v-show="heaerShow">
         <x-header :left-options="{backText: ''}" :title="toptitle"></x-header>
         <img v-show="shopShow" src="../.././assets/iconfont-shopcart.png" alt="" class="shopcart" @click="goShopCart">
    </div>
</template>
<script>
import {XHeader} from 'vux'
export default {
  // 最顶部黑色栏
  data () {
    return {
      msg: '',
    }
  },
  created () {
  },
  mounted () {
    
  },
  computed:{
    toptitle(){
      return this.$store._modules.root._children.b.state.title
    },
    shopShow(){
      return this.$store._modules.root._children.b.state.shopShow
    },
    heaerShow(){
      return this.$store._modules.root._children.b.state.headerShow
    },
    color(){
      return this.$store._modules.root._children.c.state.color
    },
    
  },
  methods:{
    goShopCart(){
        this.$router.push({
            path:"/shopcart"
        })
    }
  },
  components: {
    XHeader
  }
};
</script>
<style lang="less" scoped>
.xheader{
   position: fixed;
   top:0px;
   width: 100%;
   height:4rem;
   z-index:99;
   &>div{
       height:100%;
   }
}
</style>
